Skip to main content

Color3 Class

Description:

  A class for creating Color3 objects.

__call

Type: Metamethod.

Description:

  Creates a color with all channels set to 0.

Signature:

metamethod __call: function(self: Color3Class): Color3

Returns:

Return TypeDescription
Color3A new Color3 object.

__call

Type: Metamethod.

Description:

  Creates a new Color3 object from an RGB integer value.

Signature:

metamethod __call: function(self: Color3Class, rgb: integer): Color3

Parameters:

ParameterTypeDescription
rgbintegerThe RGB integer value to create the color from.For example 0xffffff (white), 0xff0000 (red)

Returns:

Return TypeDescription
Color3A new Color3 object.

__call

Type: Metamethod.

Description:

  Creates a new Color3 object from RGB color channel values.

Signature:

metamethod __call: function(self: Color3Class, r: integer, g: integer, b: integer): Color3

Parameters:

ParameterTypeDescription
rintegerThe red channel value (0-255).
gintegerThe green channel value (0-255).
bintegerThe blue channel value (0-255).

Returns:

Return TypeDescription
ColorA new Color3 object.